package com.bawei.module_goods.ui

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.bawei.module_goods.databinding.DialogParamBinding
import com.google.android.material.bottomsheet.BottomSheetDialogFragment

class ParamDialog(private val paramTitle: String, private val paramContent: String) : BottomSheetDialogFragment() {
    private var _binding: DialogParamBinding? = null
    private val binding get() = _binding!!

    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
        _binding = DialogParamBinding.inflate(inflater, container, false)
        return binding.root
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        binding.tvTitle.text = paramTitle
        binding.tvContent.text = paramContent
        binding.ivClose.setOnClickListener { dismiss() }
        binding.btnDone.setOnClickListener { dismiss() }
    }

    override fun onDestroyView() {
        super.onDestroyView()
        _binding = null
    }
} 